# -*- coding:utf-8 -*-
import tornado.web
from settings import settings
from controllers import home
from controllers import account
from controllers import foo

application = tornado.web.Application(
	[
		(r"/index/(?P<page>\d*)", home.IndexHandler),
		(r"/account/login", account.LoginHandler),
		(r"/account/manager", account.managerHandler),
		(r"/account/logout", account.LogoutHandler),
		(r"/account/login_ajax", account.Login_ajaxHandler),
		(r"/account/login_code", account.Login_codeHandler),
		(r"/account/login_checkcode", account.Login_checkcodeHandler),
		(r"/foo/ui", foo.UIHandler),
		(r"/foo/reg/(?P<nid>\d*)/(?P<num>\d*)", foo.RegHandler),
		(r"/foo/cookie1", foo.Cookie1Handler),
		(r"/foo/cookie2", foo.Cookie2Handler),
		(r"/foo/manager", foo.ManagerHandler),
		# (r"/foo/cookie3", foo.Cookie3Handler),
		# (r"/foo/manager3", foo.Manager3Handler),
		(r"/foo/cookie4", foo.Cookie4Handler),
		(r"/foo/manager4", foo.Manager4Handler),
		(r"/foo/csrf", foo.CsrfHandler),
		(r"/foo/ajax", foo.AjaxHandler),
		(r"/foo/validate", foo.ValidateHandler),
		(r"/foo/cachepage", foo.CachePageHandler),
	], **settings
)

